package com.chen.mapper;

import com.chen.entity.CartItem;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chen.vo.CartProduct;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 购物车表 Mapper 接口
 * </p>
 *
 * @author cws
 * @since 2024-11-26
 */
@Mapper
public interface CartItemMapper extends BaseMapper<CartItem> {

    /**
     * 数量加1
     * @param id
     * @return
     */
    int quantityAddOnne(Long id);


    /**
     * 数量减1
     * @param id
     * @return
     */
    int quantityMinusOnne(Long id);

    List<CartItem> ByUserOfCartList(Long id);

    List<CartProduct> getCartProduct(@Param("list") List<Long> list);
}
